/*
 * XML Type:  FeatureModel
 * Namespace: http:///org/isistan/flabot/coremodel.ecore
 * Java type: org.isistan.flabot.coremodelEcore.FeatureModel
 *
 * Automatically generated - do not modify.
 */
package org.isistan.flabot.coremodelEcore.impl;
/**
 * An XML FeatureModel(@http:///org/isistan/flabot/coremodel.ecore).
 *
 * This is a complex type.
 */
public class FeatureModelImpl extends org.isistan.flabot.coremodelEcore.impl.NamedElementModelImpl implements org.isistan.flabot.coremodelEcore.FeatureModel
{
    private static final long serialVersionUID = 1L;
    
    public FeatureModelImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName EXTENDEDDATA$0 = 
        new javax.xml.namespace.QName("", "extendedData");
    private static final javax.xml.namespace.QName COMPONENTS$2 = 
        new javax.xml.namespace.QName("", "components");
    private static final javax.xml.namespace.QName COMPONENTS2$4 = 
        new javax.xml.namespace.QName("", "components");
    private static final javax.xml.namespace.QName EXTENDEDDATA2$6 = 
        new javax.xml.namespace.QName("", "extendedData");
    
    
    /**
     * Gets array of all "extendedData" elements
     */
    public org.isistan.flabot.coremodelEcore.EStringToEObjectMapEntry[] getExtendedDataArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(EXTENDEDDATA2$6, targetList);
            org.isistan.flabot.coremodelEcore.EStringToEObjectMapEntry[] result = new org.isistan.flabot.coremodelEcore.EStringToEObjectMapEntry[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "extendedData" element
     */
    public org.isistan.flabot.coremodelEcore.EStringToEObjectMapEntry getExtendedDataArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.EStringToEObjectMapEntry target = null;
            target = (org.isistan.flabot.coremodelEcore.EStringToEObjectMapEntry)get_store().find_element_user(EXTENDEDDATA2$6, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "extendedData" element
     */
    public int sizeOfExtendedDataArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(EXTENDEDDATA2$6);
        }
    }
    
    /**
     * Sets array of all "extendedData" element  WARNING: This method is not atomicaly synchronized.
     */
    public void setExtendedDataArray(org.isistan.flabot.coremodelEcore.EStringToEObjectMapEntry[] extendedDataArray)
    {
        check_orphaned();
        arraySetterHelper(extendedDataArray, EXTENDEDDATA2$6);
    }
    
    /**
     * Sets ith "extendedData" element
     */
    public void setExtendedDataArray(int i, org.isistan.flabot.coremodelEcore.EStringToEObjectMapEntry extendedData)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.EStringToEObjectMapEntry target = null;
            target = (org.isistan.flabot.coremodelEcore.EStringToEObjectMapEntry)get_store().find_element_user(EXTENDEDDATA2$6, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(extendedData);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "extendedData" element
     */
    public org.isistan.flabot.coremodelEcore.EStringToEObjectMapEntry insertNewExtendedData(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.EStringToEObjectMapEntry target = null;
            target = (org.isistan.flabot.coremodelEcore.EStringToEObjectMapEntry)get_store().insert_element_user(EXTENDEDDATA2$6, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "extendedData" element
     */
    public org.isistan.flabot.coremodelEcore.EStringToEObjectMapEntry addNewExtendedData()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.EStringToEObjectMapEntry target = null;
            target = (org.isistan.flabot.coremodelEcore.EStringToEObjectMapEntry)get_store().add_element_user(EXTENDEDDATA2$6);
            return target;
        }
    }
    
    /**
     * Removes the ith "extendedData" element
     */
    public void removeExtendedData(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(EXTENDEDDATA2$6, i);
        }
    }
    
    /**
     * Gets array of all "components" elements
     */
    public org.isistan.flabot.coremodelEcore.ComponentModel[] getComponentsArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(COMPONENTS2$4, targetList);
            org.isistan.flabot.coremodelEcore.ComponentModel[] result = new org.isistan.flabot.coremodelEcore.ComponentModel[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "components" element
     */
    public org.isistan.flabot.coremodelEcore.ComponentModel getComponentsArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.ComponentModel target = null;
            target = (org.isistan.flabot.coremodelEcore.ComponentModel)get_store().find_element_user(COMPONENTS2$4, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "components" element
     */
    public int sizeOfComponentsArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(COMPONENTS2$4);
        }
    }
    
    /**
     * Sets array of all "components" element  WARNING: This method is not atomicaly synchronized.
     */
    public void setComponentsArray(org.isistan.flabot.coremodelEcore.ComponentModel[] componentsArray)
    {
        check_orphaned();
        arraySetterHelper(componentsArray, COMPONENTS2$4);
    }
    
    /**
     * Sets ith "components" element
     */
    public void setComponentsArray(int i, org.isistan.flabot.coremodelEcore.ComponentModel components)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.ComponentModel target = null;
            target = (org.isistan.flabot.coremodelEcore.ComponentModel)get_store().find_element_user(COMPONENTS2$4, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(components);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "components" element
     */
    public org.isistan.flabot.coremodelEcore.ComponentModel insertNewComponents(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.ComponentModel target = null;
            target = (org.isistan.flabot.coremodelEcore.ComponentModel)get_store().insert_element_user(COMPONENTS2$4, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "components" element
     */
    public org.isistan.flabot.coremodelEcore.ComponentModel addNewComponents()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.ComponentModel target = null;
            target = (org.isistan.flabot.coremodelEcore.ComponentModel)get_store().add_element_user(COMPONENTS2$4);
            return target;
        }
    }
    
    /**
     * Removes the ith "components" element
     */
    public void removeComponents(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(COMPONENTS2$4, i);
        }
    }
    
    /**
     * Gets the "components" attribute
     */
    public java.lang.String getComponents2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(COMPONENTS2$4);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "components" attribute
     */
    public org.apache.xmlbeans.XmlString xgetComponents2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(COMPONENTS2$4);
            return target;
        }
    }
    
    /**
     * True if has "components" attribute
     */
    public boolean isSetComponents2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(COMPONENTS2$4) != null;
        }
    }
    
    /**
     * Sets the "components" attribute
     */
    public void setComponents2(java.lang.String components2)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(COMPONENTS2$4);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(COMPONENTS2$4);
            }
            target.setStringValue(components2);
        }
    }
    
    /**
     * Sets (as xml) the "components" attribute
     */
    public void xsetComponents2(org.apache.xmlbeans.XmlString components2)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(COMPONENTS2$4);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(COMPONENTS2$4);
            }
            target.set(components2);
        }
    }
    
    /**
     * Unsets the "components" attribute
     */
    public void unsetComponents2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(COMPONENTS2$4);
        }
    }
    
    /**
     * Gets the "extendedData" attribute
     */
    public java.lang.String getExtendedData2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(EXTENDEDDATA2$6);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "extendedData" attribute
     */
    public org.apache.xmlbeans.XmlString xgetExtendedData2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(EXTENDEDDATA2$6);
            return target;
        }
    }
    
    /**
     * True if has "extendedData" attribute
     */
    public boolean isSetExtendedData2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(EXTENDEDDATA2$6) != null;
        }
    }
    
    /**
     * Sets the "extendedData" attribute
     */
    public void setExtendedData2(java.lang.String extendedData2)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(EXTENDEDDATA2$6);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(EXTENDEDDATA2$6);
            }
            target.setStringValue(extendedData2);
        }
    }
    
    /**
     * Sets (as xml) the "extendedData" attribute
     */
    public void xsetExtendedData2(org.apache.xmlbeans.XmlString extendedData2)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(EXTENDEDDATA2$6);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(EXTENDEDDATA2$6);
            }
            target.set(extendedData2);
        }
    }
    
    /**
     * Unsets the "extendedData" attribute
     */
    public void unsetExtendedData2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(EXTENDEDDATA2$6);
        }
    }
}
